//
//  AboutMeViewController.m
//  图片故事
//
//  Created by 爽 on 16/3/3.
//  Copyright © 2016年 helloApp. All rights reserved.
//

#import "AboutMeViewController.h"
#import "Header.h"
#import "MBProgressHUD+PKX.h"

@interface AboutMeViewController ()
@property (nonatomic ,strong)UIImageView *imageView;
@property (nonatomic,strong)UILabel *Tplabel;
@property (nonatomic,strong)UILabel *Editionlabel;
@property (nonatomic,strong)UIButton *button;
@property (nonatomic,strong)UILabel *Jglabel;
@property (nonatomic,strong)UILabel *Bqlabel;
@end

@implementation AboutMeViewController
-(UILabel *)Bqlabel {
    if (!_Bqlabel) {
        _Bqlabel = [[UILabel alloc] initWithFrame:CGRectMake((SCREEN_W -My_Width(300)) / 2, My_Height(445), My_Width(300), My_Height(50))];
        _Bqlabel.text = @"Copyright © 2016TuPian. \n All Rights Reserved.";
        _Bqlabel.font = [UIFont systemFontOfSize:15.0];
        _Bqlabel.textColor = [UIColor grayColor];
        _Bqlabel.numberOfLines = 0;
        _Bqlabel.textAlignment = NSTextAlignmentCenter;
    }
    return _Bqlabel;
}

-(UILabel *)Jglabel {
    if (!_Jglabel) {
        _Jglabel = [[UILabel alloc] initWithFrame:CGRectMake((SCREEN_W - My_Width(200)) / 2, My_Height(400), My_Width(200), My_Height(50))];
        _Jglabel.text = @"图片故事  版权所有";
        _Jglabel.font = [UIFont systemFontOfSize:17.0];
        _Jglabel.textColor = [UIColor grayColor];
        _Jglabel.textAlignment = NSTextAlignmentCenter;

    }
    return _Jglabel;
}

-(UIButton *)button {
    if (!_button) {
        _button = [UIButton buttonWithType:UIButtonTypeCustom];
        _button.frame = CGRectMake((SCREEN_W -My_Width(200)) / 2, My_Width(285), My_Width(200), My_Height(40));
        [_button setTitle:@"检查版本更新" forState:UIControlStateNormal];
        _button.backgroundColor = [UIColor colorWithRed:102 / 255.0 green:214 / 255.0 blue:228 / 255.0 alpha:1];
        [_button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        _button.layer.cornerRadius = My_Width(20);
        _button.titleLabel.font = [UIFont systemFontOfSize:16.0];
        [_button addTarget:self action:@selector(action_ClickedEvent) forControlEvents:UIControlEventTouchUpInside];
    }
    return _button;
}
-(UILabel *)Editionlabel {
    if (!_Editionlabel) {
        _Editionlabel = [[UILabel alloc] initWithFrame:CGRectMake((SCREEN_W - My_Width(120)) / 2, My_Width(235), My_Width(120), My_Height(50))];
        _Editionlabel.text = @"1.0.0 正式版";
        _Editionlabel.font = [UIFont systemFontOfSize:16.0];
        _Editionlabel.textAlignment = NSTextAlignmentCenter;
        [_Editionlabel setTextColor:[UIColor grayColor]];
    }
    return _Editionlabel;
}
#pragma mark -- 懒加载
-(UILabel *)Tplabel {
    if (!_Tplabel) {
        _Tplabel = [[UILabel alloc] initWithFrame:CGRectMake((SCREEN_W - My_Width(90)) / 2, My_Width(210), My_Width(90), My_Height(50))];
        _Tplabel.text = @"图片故事";
        [_Tplabel setTextColor:[UIColor grayColor]];
        _Tplabel.font = [UIFont systemFontOfSize:16.0];
        _Tplabel.textAlignment = NSTextAlignmentCenter;

    }
    return _Tplabel;
}


-(UIImageView *)imageView {
    if (!_imageView) {
        _imageView = [[UIImageView alloc] initWithFrame:CGRectMake((SCREEN_W - My_Width(90)) / 2, My_Height(115), My_Width(90), My_Height(90))];
        _imageView.image = [UIImage imageNamed:@"icon"];
        
    }
    return _imageView;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    [self.view setBackgroundColor:Bg_Color];
     self.title = @"关于图片故事";
    [self.view addSubview:self.imageView];
    [self.view addSubview:self.Tplabel];
    [self.view addSubview:self.Editionlabel];
    [self.view addSubview:self.button];
    [self.view addSubview:self.Jglabel];
    [self.view addSubview:self.Bqlabel];
    UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithTitle:@"返回" style:UIBarButtonItemStylePlain target:self action:@selector(returnbutton)];
    self.navigationItem.leftBarButtonItem = backItem;
}
-(void)returnbutton {
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)action_ClickedEvent {
    [MBProgressHUD showSuccess:@"已是最新版本"];
}


@end
